package com.peitamerchants.ui.fragment.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by zy on 2017/5/15.
 */

public class FragmentAdapter extends FragmentPagerAdapter {

        private List<Fragment> frags;
        private String[] title;

        public FragmentAdapter(FragmentManager fm, List<Fragment> frags) {
            super(fm);
            this.frags = frags;
        }
        @Override
        public Fragment getItem(int arg0) {
            return frags.get(arg0);
        }

        @Override
        public int getCount() {
            return frags.size();
        }

}
